home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Hardware / Mac OS USB DDK / Mac OS USB DDK 1.4.1 / Examples / USBSampleStorageDriver / StorageClassDriver / StorageClassShimDS.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-25  |  1.6 KB  |  54 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        StorageClassShimDS.c
  3.  
  4.     Contains:    USB Storage Class Shim Driver Services - 
  5.                 This file contains all functions related to providing driver services
  6.                 to USB Unit Table drivers.
  7.  
  8.     Version:    1.3
  9.  
  10.  
  11. */
  12.  
  13. #pragma once
  14.  
  15. #include <USB.h>
  16. #include <Dialogs.h>
  17. #include "StorageClassPublicAPI.h"
  18.  
  19. // The structures for our DriverInfo queue
  20. typedef struct DriverInfo    DriverInfo, *DriverInfoPtr;
  21. struct DriverInfo
  22. {
  23.     DriverInfoPtr                nextDriverInfo;
  24.     USBDeviceRef                 usbDeviceRef;
  25.     USBDeviceRef                parentsDeviceRef;
  26.     USBStorageClassSetupTable     theSetupTable;
  27.     Str255                        VendorProductStr;
  28.     UInt8                         usbSubClass;
  29.     UInt8                         usbProtocol;
  30.     UInt16                         usbVendor;
  31.     UInt16                         usbProduct;
  32.     DriverRefNum                drvrRefNum;
  33.     Handle                        drvrHndlInMemory;
  34.     FSSpec                        driverFile;
  35.     NMRec                        theAlertNMRec;
  36.     AlertStdAlertParamRec        theAlertPR;
  37.     Boolean                        hasDialog;
  38.     UInt16                         messageNumber;
  39.     USBPB                        configAgainPB;
  40.     CntrlParam                    controlPB;
  41. };
  42.  
  43. extern DriverInfoPtr     GetDriverInfoHeadPtr( void );
  44. extern DriverInfoPtr     FindDriverInfoByDrvrRef( DriverRefNum drvrRefNum );
  45. extern DriverInfoPtr     FindDriverInfoByUSBDeviceRef( USBDeviceRef usbDeviceRef );
  46. extern DriverInfoPtr     AddDriverInfoPtr( void );
  47. extern void             RemoveDriverInfoPtr( DriverInfoPtr oldInfoPtr );
  48.  
  49. extern Boolean         InitializeStorageDriverServices( void );
  50. extern Boolean         TerminateStorageDriverServices( void );
  51. extern StorageClassShimDispatchTablePtr    GetShimDispatchTablePtr( void );
  52. extern OSStatus     DisplayNotifcationDialog( DriverRefNum drvrRefNum, UInt16 messageNumber );
  53. extern OSStatus     RemoveNotificationDialog( DriverRefNum drvrRefNum, UInt16 messageNumber );
  54.